package JavaPractice;

import java.util.Scanner;

public class 西安距离 {
    public static void main(String args[]) {
        Scanner reader = new Scanner(System.in);
        long a, b, c, d;
        a = Long.valueOf(reader.next()).longValue();
        b = Long.parseLong(reader.next());
        c = Long.valueOf(reader.next()).longValue();
        d = Long.parseLong(reader.next());
        //System.out.println("a="+a+", b="+b+", c="+c+", d="+d);
        System.out.println(Math.abs(a - c) + Math.abs(b - d));
        reader.close();
    }
}
